package com.example.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.Date;

@Data
public class Friend  extends BaseEntity{
    private Long id;  //好友id
    private Long uid; //归属用户id
    private String username; //好友名称
    private String phone; //好友电话
    private String email; //好友邮箱
    private Integer gender;  //好友性别:0-女，1-男
    private String avatar;  //好友头像
    private Integer is_delete;  //好友是否删除0-未删除，1-已删除

    @TableField(exist = false)
    private Boolean state=false;  //前端是否在线,该属性不为数据库表字段

    public Friend(){}
    public Friend(Long uid,User user){
        this.uid=uid;
        this.username=user.getUsername();
        this.phone=user.getPhone();
        this.email=user.getEmail();
        this.gender=user.getGender();
        this.avatar=user.getAvatar();
        this.is_delete=0;
    }
}
